<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <div id="app"></div>
  <script type="module">
    import {reactive} from './reactive.js';
    import {effect} from './effects.js';
    import {ref} from './ref.js';
    const obj = {
      name: 'apple',
      age: 12,
      other: 'sx',
      arr: [1,2,3],
    }
    const state = reactive(obj);
    const apple = ref('apple');
    effect(() => {
      const app = document.getElementById('app');
      app.innerHTML = state.name + '-' + state.age + '-' + apple.value;
    })
    setTimeout(() => {
      state.name = '年薪百万';
      state.arr.push(123);
      apple.value = '111111111';
    }, 1000);
  </script>
</body>
</html>